<?php
if (! defined ( FLAG )){ trigger_error('Access error!', E_USER_ERROR); die; }

class MNews{
private $CONFIG;
private $PATH_MODULE;
private $NAME_MODULE;
	function  __construct($CONFIG=''){
		$this->CONFIG = $CONFIG;
		$this->NAME_MODULE = 'News';
		$this->PATH_MODULE = MODULES_DIR . '/' . $this->NAME_MODULE;
	}
	public function GetTemplatePath(){
		return $this->PATH_MODULE . '/templates/' . $this->NAME_MODULE . '.tpl';
	}
	public function GetJSPath(){
		return TOOL::Load($this->PATH_MODULE .'/' . JS_DIR, '.js');
	}
	public function GetCSSPath(){
		return TOOL::Load($this->PATH_MODULE . '/' . CSS_DIR, '.css');
	}
	public function GetName(){
		return $this->NAME_MODULE;
	}
	public function Run(){
		return array('main_text'=>'ЭТО ВСЕ СДЕЛАЛ МОДУЛЬ News');
	}
};
//echo 'I am News module!<br>';
//$NEWS = new MNews();
//global $data;
//$data['modules'][$NEWS->GetName()] = $NEWS->Run();
//$data['modules'][$NEWS->GetName()]['module_path'] = $NEWS->GetTemplatePath();
//$data['modules'][$NEWS->GetName()][ 	'js_paths'] = $NEWS->GetJSPath();
//$data['modules'][$NEWS->GetName()][    'css_paths'] = $NEWS->GetCSSPath();
?>